package exception;

public class UseThrowMain {
	
	public static void doDangerousTask() {
		String str = null;
		System.out.println(str.length());
	}
	
	public static void main(String[] args) {
		
		try {
			System.out.println("A");
//			doDangerousTask();
			throw new MyException("에러 메시지");
		} catch (Exception e) {
			System.out.println("=== Exception 발생 ===");
			System.out.println("정보:e.getMessage(): " + e.getMessage());
			System.out.println("정보:e.toString():   " + e.toString());
			e.printStackTrace();
		} finally {
			System.out.println("finally");
		}
		
	}
	
}
